'use strict'
const koa = require('koa')
const bodyparser = require('koa-bodyparser')
const routers = require('./router')
const cors = require('koa-cors')
const {sync}= require('./model')
let app = new koa()
sync()
app.use(cors())
app.use(bodyparser())
app.use(routers())

let listen =8000
app.listen(listen)
console.log('已启动：http://localhost:8000');